﻿@model sipfe.model.dataAccess.SIPMaeEmpresa
@using Resources;
<script type="text/javascript" src="@Url.Content(@properties.nuevoJS)" ></script>
<div id="divDireccionPersona">@RenderPage("../../Shared/RODatosDireccionEmpresa.cshtml")</div>
<br />

<fieldset style="width: 730px;">
    <legend><span>Registrar Nueva Dirección</span></legend>
    <table>
        <tr>
            <td>
                <table class="tituloCelesteN8">
                    <tr>
                        <td>Tipo de Vía <span class="asterisco">(*)</span></td>
                        <td style="width: 10px;">&nbsp;</td>
                        <td>Nombre de la Vía<span class="asterisco">(*)</span></td>
                        <td style="width: 10px;">&nbsp;</td>
                        <td># Puerta</td>
                        <td>&nbsp;</td>
                        <td>Letra</td>
                    </tr>
                    <tr>
                        <td>@Html.DropDownList("nIdeTipoVia", (IEnumerable<SelectListItem>)ViewBag.TipoVia, "--Seleccione--")</td>
                        <td>&nbsp;</td>
                        <td>@Html.TextBox("vNomVia", null, new { @style = "width:500px;", maxlength = 300, ondblclick = "javascript:cleanBox(this);", onblur = "javascript:onBlurUpper(this);", onkeypress = "return validaAlfaNumTamanio(this, event, 300);" })</td>
                        <td>&nbsp;</td>
                        <td>@Html.TextBox("vNumPuerta", null, new { @style = "width:50px;", maxlength = 10, onkeypress = "return validarSoloNumeros(event);", ondblclick = "javascript:cleanBox(this);" })</td>
                        <td>-</td>
                        <td>@Html.TextBox("vLetra", null, new { @style = "width:30px;", maxlength = 1, onkeypress = "return validarSoloLetras(event);", ondblclick = "javascript:cleanBox(this);", onblur = "javascript:onBlurUpper(this);" })</td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td>&nbsp;</td>
        </tr>
        <tr>
            <td>
                <table class="tituloCelesteN8">
                    <tr>
                        <td>Tipo de Zona<span class="asterisco">(*)</span></td>
                        <td style="width: 10px;">&nbsp;</td>
                        <td>Nombre de la Zona<span class="asterisco">(*)</span></td>
                        <td style="width: 10px;">&nbsp;</td>
                        <td>Centro Poblado</td>
                    </tr>
                    <tr>
                        <td>@Html.DropDownList("nIdeTipoZona", (IEnumerable<SelectListItem>)ViewBag.TipoZona, "--Seleccione--")</td>
                        <td>&nbsp;</td>
                        <td>@Html.TextBox("vNomZona", null, new { @style = "width:270px;", maxlength = 300, ondblclick = "javascript:cleanBox(this);", onblur = "javascript:onBlurUpper(this);", onkeypress = "return validaAlfaNumTamanio(this, event, 300);" })</td>
                        <td>&nbsp;</td>
                        <td>@Html.TextBox("vCenPob", null, new { @style = "width:270px;", maxlength = 200, ondblclick = "javascript:cleanBox(this);", onblur = "javascript:onBlurUpper(this);", onkeypress = "return validaAlfaNumTamanio(this, event, 200);" })</td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr><td>&nbsp;</td></tr>
        <tr>
            <td>
                <table class="tituloCelesteN8">
                    <tr>
                        <td style="width:40px;">Block</td>
                        <td style="width:40px;">Piso</td>
                        <td style="width:60px;">Interior</td>
                        <td style="width:60px;">Manzana</td>
                        <td style="width:60px;">Lote</td>
                        <td style="width:70px;">Kilometro</td>
                        <td>Referencia</td>
                    </tr>
                    <tr>
                        <td>@Html.TextBox("nBlock", null,new {@style="width:30px;", maxlength=10 ,ondblclick="javascript:cleanBox(this);", onblur="javascript:onBlurUpper(this);", onkeypress="return validaAlfaNumTamanio(this, event, 10);" })</td>
                        <td>@Html.TextBox("nPiso", null,new {@style="width:30px;", maxlength=10 ,ondblclick="javascript:cleanBox(this);", onblur="javascript:onBlurUpper(this);", onkeypress="return validaAlfaNumTamanio(this, event, 10);" })</td>
                        <td>@Html.TextBox("nInterior", null,new {@style="width:30px;", maxlength=10 ,ondblclick="javascript:cleanBox(this);", onblur="javascript:onBlurUpper(this);", onkeypress="return validaAlfaNumTamanio(this, event, 10);" })</td>
                        <td>@Html.TextBox("vManzana", null,new {@style="width:40px;", maxlength=10 ,ondblclick="javascript:cleanBox(this);", onblur="javascript:onBlurUpper(this);", onkeypress="return validaAlfaNumTamanio(this, event, 10);" })</td>
                        <td>@Html.TextBox("vLote", null,new {@style="width:40px;", maxlength=10 ,ondblclick="javascript:cleanBox(this);", onblur="javascript:onBlurUpper(this);", onkeypress="return validaAlfaNumTamanio(this, event, 10);" })</td>
                        <td>@Html.TextBox("vKilometro", null,new {@style="width:40px;", maxlength=10 ,ondblclick="javascript:cleanBox(this);", onblur="javascript:onBlurUpper(this);", onkeypress="return validaAlfaNumTamanio(this, event, 10);" })</td>
                        <td>@Html.TextArea("vRef",null,new {@style="width:385px;",  rows=2, maxlength=300 ,ondblclick="javascript:cleanBox(this);", onblur="javascript:onBlurUpper(this);", onkeypress="return validaAlfaNumTamanio(this, event, 300);" })</td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr><td>&nbsp;</td></tr>
        <tr>
            <td>
                <table style="width:700px;" class="tituloCelesteN8">
                    <tr>                           
                        <td>Región / Departamento<span class="asterisco">(*)</span></td>
                        <td>Provincia<span class="asterisco">(*)</span></td>
                        <td>Distrito<span class="asterisco">(*)</span></td>
                    </tr>
                    <tr>
                        <td>@Html.DropDownList("nIdeRegionNac", (IEnumerable<SelectListItem>)ViewBag.Regiones, "--Seleccione--", new {style = "width:200px;", onchange="javascript:cargaUbigeo(this,'3');" })</td>
                        <td>
                            <div id="divProvinciasDir">
                                <select id="nIdeProvNac" name="nIdeProvNac" style="width:200px;" >
                                    <option value="">--Seleccione--</option>
                                </select>
                            </div>
                        </td>
                        <td>
                            <div id="divDistritosDir">
                                <select id="nIdeDistritoNac" name="nIdeDistritoNac" style="width:200px;" >
                                    <option value="">--Seleccione--</option>
                                </select>
                            </div>
                        </td>
                    </tr>
                </table>
            </td>
        </tr> 
    </table>
</fieldset>
 <table style="width: 720px;" >
    <tr>
        <td style="width:400px;">El campo es obligatorio<span class="asterisco">(*)</span></td>
        <td>
            <input type="button" value="Registrar"  class="button white"  onclick="javascript: agregarDireccionPersonaMante('#divDireccionPersona','@ViewBag.swReg');" />
        </td>
    </tr>
</table>

